package pl.PawelAndAlicja.badugiproject.main.Cards;

import static org.junit.Assert.*;

import java.util.Random;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;


public class HandMasterTest {

	String[] cardTypes = {"Spade","Club","Diamond","Heart"};
	String[] cardNames = {"King", "Queen", "Jack", "10", "9", "8", "7", "6", "5", "4", "3", "2", "Ace"};
	String cardType="", cardName="";
	FlyweightCard card, card0;
	FlyweightFactoryCard factoryCard;
	ClientDeck deck;
	
	
	@Before
	public void setUp(){
		factoryCard= new FlyweightFactoryCard();
		deck = new ClientDeck(factoryCard);
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testPullOut() {
		card = new FlyweightCard("Jack","Diamond");
		card0 = new FlyweightCard("7","Spade");
		String card1 = card.toString();
		String card2 = deck.createCard(cardTypes[2], cardNames[2]).toString();
		String card3 = card0.toString();
		String card4 = deck.createCard(cardTypes[0], cardNames[6]).toString();
		assertEquals(card1, card2);
		assertEquals(card3, card4);
		card=null;
	}
	
}
